package com.zxu.test.base;

import android.content.Intent;
import androidx.fragment.app.Fragment;
import com.zxu.test.start.SplashActivity;

public abstract class BaseFragment extends Fragment {

    public void restartApp() {
        if(getActivity() != null) {
            getActivity().finish();
            Intent intent = new Intent(getContext(), SplashActivity.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            startActivity(intent);
        }
    }
}
